<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>书籍列表</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
</head>
<body>
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="layui-header">
                <h1>
                    <small>书籍列表————显示所有书籍</small>
                </h1>
            </div>
        </div>

    </div>
    <div class="layui-row">
        <div class="layui-col-md4">
            <a class="layui-btn layui-btn-normal" th:href="@{/addBook}">
                <i class="layui-icon layui-icon-addition"></i>
                新增书籍
            </a>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12">
            <table class="layui-table" lay-even lay-skin="nob">
                <thead>
                <tr>
                    <th>书籍编号</th>
                    <th>书籍名称</th>
                    <th>书籍数量</th>
                    <th>书籍详情</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="book : ${bookList}">
                    <td th:text="${book.getBookId()}"></td>
                    <td th:text="${book.getBookName()}"></td>
                    <td th:text="${book.getBookCount()}"></td>
                    <td th:text="${book.getBookDetail()}"></td>
                    <td>
                        <a class="layui-btn layui-btn-primary" th:href="@{/updateBook(id=${book.getBookId()})}">
                            <i class="layui-icon layui-icon-edit"></i>
                            修改
                        </a>
                        <a class="layui-btn layui-btn-primary" th:href="@{/deleteBook(id=${book.getBookId()})}">
                            <i class="layui-icon layui-icon-delete"></i>
                            删除
                        </a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script th:src="@{/layui/layui.js}"></script>
</body>
</html>